import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:${USER}
 * Date:${YEAR}-${MONTH}-${DAY}
 * ${TIME}
 */
public class Main {
    public static void main(String[] args) {
        boolean b=CheckPermutation("abc","bca");
        System.out.println(b);
    }

    public static boolean CheckPermutation(String s1, String s2) {
        char[] c1=s1.toCharArray();
        char[] c2=s2.toCharArray();
        Arrays.sort(c1);Arrays.sort(c2);
        s1=new String(c1);
        s2=new String(c2);
        if(s1.equals(s2)){//==判断的是地址，所以应该用equals
            return true;
        }
        return false;
    }

}